/*--------------------------------------------------------------------------------------------------
Yatak Operation System Project Copyright 2012-2013
Author : Ilya Churaev
Started : 20 Dec 2012		Updated : 25 Jan 2013
File Name : test_task.c     Purpose : create empty task
--------------------------------------------------------------------------------------------------*/
#include <yatak/yatak.h>
#include <string.h>
#include <shell.h>
#include <sched.h>

void ChildFunc ()
{
	for (;;); 
}
void Func (int num)
{
	int i;
	unsigned int flags;
	save_flags (flags);
	cli();
	for (i = 0; i < num; i++)
		start_task("testch", false, ChildFunc, 0, NULL);
	restore_flags (flags);
	for (;;);
}
void TestTask (char * param)
{
	char * line = strsep (&param," \0");
	int num = atoi (line), numm = 0;
	if (param [0] != '\0')
		numm = atoi (param);
	unsigned int flags;
	save_flags (flags);
	cli();
	int i = 0;
	for (i = 0; i < num; i++)
		start_task("test", false, Func, 1, numm);
	restore_flags (flags);
	for (;;);
}
